
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="tfn" uri="http://www.totoro.com/functions" %>
<html>
<head>
    <title>${enter}-天貓Tmall.com-理想生活上天貓</title>
</head>
<body>
<div class="page">
    <!--dingtianB begin -->

    <!--dingtianB end -->
    <div id="mallPage" class=" mallist tmall- page-not-market ">
        <style>
            button {
                border-radius: 0;
            }
        </style>
        <!--from fragment-->
        <div id="header" class=" header-list-app" data-spm="a2226n0">
            <div class="headerLayout">
                <div class="headerCon ">
                    <h1 id="mallLogo">
								<span class="mlogo">
									<a href="/" title="天猫Tmall.com"><s></s>天猫Tmall.com</a>
								</span>
                        <span class="slogo">
									<a href=""></a>
								</span>
                    </h1>

                    <div class="header-extra">
                        <div class="header-banner">

                            <style>
                                #mallPage .header-extra .header-banner {
                                    height: 80px !important;
                                }

                                #mallPage .header-extra .header-banner img {
                                    cursor: default;
                                }
                            </style>
                            <a href="https://pages.tmall.com/wow/portal/act/app-download?mmstat=searchbanner&amp;src=searchbanner"
                               target="_self" atpanel="1,,,,36,headerbanner,,">
                                <img src="https://img.alicdn.com/tfs/TB1vg2XbQL0gK0jSZFxXXXWHVXa-380-160.png"
                                     alt="" title="" width="190" height="80">
                            </a>


                        </div>
                        <div id="mallSearch" class="mall-search">
                            <form name="searchTop" action="/search_product.htm" method="get" class="mallSearch-form clearfix" target="_top">
                                <fieldset>
                                    <legend>天猫搜索</legend>
                                    <div class="mallSearch-input clearfix">
                                        <label for="mq" style="display: none;">搜索 天猫 商品/品牌/店铺</label>
                                        <div class="s-combobox" id="s-combobox-716">
                                            <div class="s-combobox-input-wrap">
                                                <input type="text" name="enter" accesskey="s" autocomplete="off"
                                                       x-webkit-speech="" x-webkit-grammar="builtin:translate"
                                                       value="${enter}" id="mq" data-bts="" class="s-combobox-input"
                                                       role="combobox" aria-haspopup="true" title="请输入搜索文字"
                                                       aria-label="请输入搜索文字">
                                            </div>
                                            <label for="mq" class="s-combobox-placeholder"
                                                   style="color: rgb(102, 102, 102); display: none; visibility: hidden;">搜索
                                                天猫 商品/品牌/店铺</label>
                                        </div>
                                        <button type="submit" name="search-btn" value="搜索">搜索<s></s>
                                        </button>
                                        <input type="hidden" name="spm" value="${tfn:getRandomChar(27)}">
                                    </div>
                                </fieldset>
                            </form>
                            <ul class="relKeyTop">
                                <c:forEach items="${textLists}" var="text" varStatus="vs">
                                    <li><a href="?enter=${text.text}">${text.text}</a></li>
                                </c:forEach>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div id="content" data-spm-anchor-id="a220m.1000858.0.i1.589537f3HHnMoY">
            <div class="main">
                <div class="crumb" id="J_crumbs">
                    <div class="crumbCon">
                        <div class="crumbSlide" id="J_CrumbSlide">
                            <a title="上一页" class="crumbSlide-prev" id="J_CrumbSlidePrev"
                               style="visibility: hidden;">&lt;</a>
                            <i class="crumbSlide-prev-shadow"></i>
                            <div class="crumbClip">
                                <ul class="crumbSlide-con clearfix" id="J_CrumbSlideCon"
                                    data-atp="{loc},{i},,,,{t},rightnav,">
                                    <li>
                                        <a class="crumbStrong"
                                           href="?enter=${param.enter}&sort=${param.sort}&discount=${param.discount}&lowPrice=${param.lowPrice}&highPrice=${param.highPrice}"
                                           data-i="cat" data-t="3">全部</a>
                                        <i class="crumbArrow">&gt;</i>
                                    </li>
                                    <li>
                                        <a class="crumbStrong"
                                           href="?enter=${param.enter}&cat=${selectedCategory.id}&sort=${param.sort}&discount=${param.discount}&lowPrice=${param.lowPrice}&highPrice=${param.highPrice}"
                                           data-i="cat" data-t="3">${selectedCategory.name}</a>
                                    </li>

                                    <li class="crumbSearch">
                                        <form action="?" id="J_CrumbSearchForm">
                                            <label class="crumbSearch-label" for="J_CrumbSearchInuput">
                                                <input type="hidden" name="cat" value="${param.cat}"/>
                                                <input type="hidden" name="sort" value="${param.sort}"/>
                                                <input type="hidden" name="discount" value="${param.discount}"/>
                                                <input type="hidden" name="lowPrice" value="${param.lowPrice}"/>
                                                <input type="hidden" name="highPrice" value="${param.highPrice}"/>
                                                <input type="text" name="enter" value="${param.enter}" class="crumbSearch-input"
                                                       id="J_CrumbSearchInuput" aria-label="搜索关键词">
                                            </label>
                                            <input type="submit" value="" id="J_CrumbSearchBtn"
                                                   class="crumbSearch-btn"
                                                   onclick="atpanelFun(',secondsearch,,,,20,rightnav,')"
                                                   aria-label="搜索">
                                            <input type="hidden" name="sort" value="s"><input type="hidden"
                                                                                              name="style" value="g"><input type="hidden" name="from"
                                                                                                                            value="mallfp..pc_1_suggest"><input type="hidden" name="suggest"
                                                                                                                                                                value="0_2">



                                        </form>
                                    </li>
                                </ul>
                            </div>
                            <i class="crumbSlide-next-shadow"></i>
                            <a title="下一页" class="crumbSlide-next" id="J_CrumbSlideNext"
                               style="visibility: hidden;">&gt;</a>
                        </div>
                    </div>
                </div>

                <div id="J_SuggestTipWrap">
                </div>

                <!-- 喵 ~ 没找到这些商品 -->
                <%-- 如果没有查询到用户输入的，分词查询 --%>
                <c:if test="${isSplit}">
                    <%-- 如果分词查询到了 --%>
                    <c:if test="${splitStatus}">
                <div class="nrt">
                    <p>喵~沒找到與<em>“ ${enter} ”</em>相關的商品哦。</p>
                    <p class="nrt-guide">別擔心，下面是我們根據部分搜索詞幫您找到的結果：
                        <span>
                            <c:forEach items="${primarySplits}" var="primary" varStatus="prVs">
                                <a href="/search_product.htm?enter=${primary}&spm=${tfn:getRandomChar(27)}" target="_blank">${primary}</a>
                                <c:if test="${primary}">
                                    |
                                </c:if>
                            </c:forEach>
                        </span>
                    </p>
                </div>

                        <%-- 循环分词器查到的商品 --%>
                        <c:forEach items="${productMap}" var="productM" varStatus="pmVs">


                            <div class="qt">
                                <%-- 高亮关键分词字 --%>
                                <c:forEach begin="0" end="${fn:length(splits)-1}" varStatus="ssVs">
                                    <c:if test="${splits[ssVs.index] eq productM.key}" var="isPr">
                                        <em>${splits[ssVs.index]}</em>
                                        <c:set var="haveApr" value="${splits[ssVs.index]}"></c:set>
                                    </c:if>
                                    <c:if test="${!isPr}">
                                        <del>${splits[ssVs.index]}</del>
                                    </c:if>
                                </c:forEach>
                                <span class="m10">(${fn:length(productM.value)}件相關商品)</span>
                                <a href='/search_product.htm?enter=${haveApr}&ttr=${tfn:getRandomChar(27)}' target="_blank">
                                    <em class="ws m0">查看全部</em>
                                    &gt;&gt;
                                </a>
                            </div>

                            <div class="qc">
                                <div class="view grid-nosku">
                                    <%-- 二次循环 -循环该关键字下的商品 --%>
                                    <c:forEach items="${productM.value}" var="product" varStatus="pmpVs">
                                        <div class="product" data-id="635072277363">
                                            <div class="product-iWrap">
                                                <div class="productImg-wrap">
                                                    <a href="/buy.htm?pid=${product.id}&sid=${product.shop.id}&skuCode=0" class="productImg" target="_blank" atpanel="1-4-10,635072277363,50012478,1945695511,spu,1,lessprocess,2201498506788">
                                                        <img src="${product.productImages[0].imagePath}">
                                                    </a>
                                                </div>
                                                <p class="productPrice">
                                                    <em title="9.90"><b>¥</b>${product.nowPrice}</em>
                                                </p>
                                                <p class="productTitle">
                                                    <%-- 高亮显示关键字 --%>
                                                    <a href="" target="_blank" title="${product.productName}">${tfn:filterKeywords(product.productName, primarySplits)}</a>
                                                </p>
                                                </p>
                                                <div class="productShop">  <a class="productShop-name" href="/shop/view_shop.htm?brandId=${product.shop.id}" target="_blank">
                                                        ${product.shop.shopName}
                                                </a>
                                                </div>
                                                <p class="productStatus">
                                                    <span>月成交 <em>${product.dealCount}</em></span>
                                                    <span>評價 <a href="" target="_blank" atpanel="1-4-1,635072277363,50012478,1945695511,spu,1,lessprocess,2201498506788">${product.commentCount}</a></span>
                                                    <span data-icon="small" class="ww-light ww-small" data-item="635072277363" data-nick="${product.shop.shopName}" data-tnick="${product.shop.shopName}" data-display="inline">
                                                        <a data-to-uid="${product.shop.id}" target="_blank" class="ww-inline ww-online" title="点此可以直接和卖家交流选好的宝贝，或相互交流网购体验，还支持语音视频噢。"><span>旺旺在线</span></a></span>
                                                </p>
                                            </div>
                                        </div>
                                    </c:forEach>
                                </div>
                            </div>

                            <div class="clearfix">
                                <a class="qMore ui-btn-s-primary" atpanel="1-2,%BD%F0%B1%D2+%B4%F3,,,,20,lessprocess," href="?enter=${haveApr}&ttr=${tfn:getRandomChar(27)}" target="_blank">查看全部&gt;&gt;</a>
                            </div>



                        </c:forEach>
                    </c:if>
                    <%-- 如果连分词器都没有查询到商品 --%>
                    <c:if test="${!splitStatus}">
                        <div class="nrt">
                            <p>喵~很遗憾！没有找到关于<em>“ ${enter} ”</em>相關的商品哦。</p>
                            <p class="nrt-guide">这次龙猫是真的没有找到噢，请更换一个搜索词吧！
                            </p>
                        </div>
                    </c:if>
                </c:if>



                <c:if test="${isSplit == false}">
                <form id="J_NavAttrsForm" class="navAttrsForm">
                    <div class="attrs j_NavAttrs" style="display:block">
<%--                        <div class="brandAttr j_nav_brand" data-spm="a220m.1000858.1000720">--%>
<%--                            <div class="j_Brand attr">--%>
<%--                                <div class="attrKey">品牌</div>--%>
<%--                                <div class="attrValues">--%>
<%--                                    <div class="j_BrandSearch av-search clearfix">--%>
<%--                                        <input type="text" value="" placeholder="搜索&nbsp;品牌名称"--%>
<%--                                               style="color: rgb(191, 191, 191);">--%>
<%--                                    </div>--%>
<%--                                    <ul class="av-collapse row-2" data-atp="{loc},{brand},,,{f},4,{c},">--%>
<%--                                        <li>--%>
<%--                                            <a data-f="spu-brand-qp" data-c="brand-qp"--%>
<%--                                               href="?brand=20316&amp;q=%C4%CC%B7%DB&amp;sort=s&amp;style=g&amp;from=sn_1_brand-qp&amp;suggest=0_2&amp;spm=875.7931836/B.a2227oh.d100&amp;smAreaId=430200#J_crumbs"--%>
<%--                                               title="Nestle/雀巢" atpanel="1,20316,,,spu-brand-qp,4,brand-qp,">--%>
<%--                                                Nestle/雀巢--%>
<%--                                            </a>--%>
<%--                                        </li>--%>
<%--                                        <li>--%>
<%--                                            <a data-f="spu-brand-qp" data-c="brand-qp"--%>
<%--                                               href="?brand=135385360&amp;q=%C4%CC%B7%DB&amp;sort=s&amp;style=g&amp;from=sn_1_brand-qp&amp;suggest=0_2&amp;spm=875.7931836/B.a2227oh.d100&amp;smAreaId=430200#J_crumbs"--%>
<%--                                               title="DEVONDALE/德运"--%>
<%--                                               atpanel="2,135385360,,,spu-brand-qp,4,brand-qp,">--%>
<%--                                                DEVONDALE/德运--%>
<%--                                            </a>--%>
<%--                                        </li>--%>
<%--                                        <li>--%>
<%--                                            <a data-f="spu-brand-qp" data-c="brand-qp"--%>
<%--                                               href="?brand=32058&amp;q=%C4%CC%B7%DB&amp;sort=s&amp;style=g&amp;from=sn_1_brand-qp&amp;suggest=0_2&amp;spm=875.7931836/B.a2227oh.d100&amp;smAreaId=430200#J_crumbs"--%>
<%--                                               title="FIRMUS/飞鹤" atpanel="3,32058,,,spu-brand-qp,4,brand-qp,">--%>
<%--                                                FIRMUS/飞鹤--%>
<%--                                            </a>--%>
<%--                                        </li>--%>
<%--                                        <li>--%>
<%--                                            <a data-f="spu-brand-qp" data-c="brand-qp"--%>
<%--                                               href="?brand=20328&amp;q=%C4%CC%B7%DB&amp;sort=s&amp;style=g&amp;from=sn_1_brand-qp&amp;suggest=0_2&amp;spm=875.7931836/B.a2227oh.d100&amp;smAreaId=430200#J_crumbs"--%>
<%--                                               title="伊利" atpanel="4,20328,,,spu-brand-qp,4,brand-qp,">--%>
<%--                                                伊利--%>
<%--                                            </a>--%>
<%--                                        </li>--%>
<%--                                        <li>--%>
<%--                                            <a data-f="spu-brand-qp" data-c="brand-qp"--%>
<%--                                               href="?brand=101286946&amp;q=%C4%CC%B7%DB&amp;sort=s&amp;style=g&amp;from=sn_1_brand-qp&amp;suggest=0_2&amp;spm=875.7931836/B.a2227oh.d100&amp;smAreaId=430200#J_crumbs"--%>
<%--                                               title="aptamil/爱他美"--%>
<%--                                               atpanel="5,101286946,,,spu-brand-qp,4,brand-qp,">--%>
<%--                                                aptamil/爱他美--%>
<%--                                            </a>--%>
<%--                                        </li>--%>
<%--                                        <li>--%>
<%--                                            <a data-f="spu-brand-qp" data-c="brand-qp"--%>
<%--                                               href="?brand=137887&amp;q=%C4%CC%B7%DB&amp;sort=s&amp;style=g&amp;from=sn_1_brand-qp&amp;suggest=0_2&amp;spm=875.7931836/B.a2227oh.d100&amp;smAreaId=430200#J_crumbs"--%>
<%--                                               title="蒙牛" atpanel="6,137887,,,spu-brand-qp,4,brand-qp,">--%>
<%--                                                蒙牛--%>
<%--                                            </a>--%>
<%--                                        </li>--%>
<%--                                        <li>--%>
<%--                                            <a data-f="spu-brand-qp" data-c="brand-qp"--%>
<%--                                               href="?brand=190812679&amp;q=%C4%CC%B7%DB&amp;sort=s&amp;style=g&amp;from=sn_1_brand-qp&amp;suggest=0_2&amp;spm=875.7931836/B.a2227oh.d100&amp;smAreaId=430200#J_crumbs"--%>
<%--                                               title="美可卓" atpanel="7,190812679,,,spu-brand-qp,4,brand-qp,">--%>
<%--                                                美可卓--%>
<%--                                            </a>--%>
<%--                                        </li>--%>
<%--                                        <li>--%>
<%--                                            <a data-f="spu-brand-qp" data-c="brand-qp"--%>
<%--                                               href="?brand=6965217&amp;q=%C4%CC%B7%DB&amp;sort=s&amp;style=g&amp;from=sn_1_brand-qp&amp;suggest=0_2&amp;spm=875.7931836/B.a2227oh.d100&amp;smAreaId=430200#J_crumbs"--%>
<%--                                               title="Anchor/安佳"--%>
<%--                                               atpanel="8,6965217,,,spu-brand-qp,4,brand-qp,">--%>
<%--                                                Anchor/安佳--%>
<%--                                            </a>--%>
<%--                                        </li>--%>
<%--                                        <li>--%>
<%--                                            <a data-f="spu-brand-qp" data-c="brand-qp"--%>
<%--                                               href="?brand=3731790&amp;q=%C4%CC%B7%DB&amp;sort=s&amp;style=g&amp;from=sn_1_brand-qp&amp;suggest=0_2&amp;spm=875.7931836/B.a2227oh.d100&amp;smAreaId=430200#J_crumbs"--%>
<%--                                               title="Friso/美素佳儿"--%>
<%--                                               atpanel="9,3731790,,,spu-brand-qp,4,brand-qp,">--%>
<%--                                                Friso/美素佳儿--%>
<%--                                            </a>--%>
<%--                                        </li>--%>
<%--                                        <li>--%>
<%--                                            <a data-f="spu-brand-qp" data-c="brand-qp"--%>
<%--                                               href="?brand=20314&amp;q=%C4%CC%B7%DB&amp;sort=s&amp;style=g&amp;from=sn_1_brand-qp&amp;suggest=0_2&amp;spm=875.7931836/B.a2227oh.d100&amp;smAreaId=430200#J_crumbs"--%>
<%--                                               title="Mead Johnson/美赞臣"--%>
<%--                                               atpanel="10,20314,,,spu-brand-qp,4,brand-qp,">--%>
<%--                                                Mead Johnson/美赞臣--%>
<%--                                            </a>--%>
<%--                                        </li>--%>
<%--                                        <li>--%>
<%--                                            <a data-f="spu-brand-qp" data-c="brand-qp"--%>
<%--                                               href="?brand=11830443&amp;q=%C4%CC%B7%DB&amp;sort=s&amp;style=g&amp;from=sn_1_brand-qp&amp;suggest=0_2&amp;spm=875.7931836/B.a2227oh.d100&amp;smAreaId=430200#J_crumbs"--%>
<%--                                               title="君乐宝" atpanel="11,11830443,,,spu-brand-qp,4,brand-qp,">--%>
<%--                                                君乐宝--%>
<%--                                            </a>--%>
<%--                                        </li>--%>
<%--                                        <li>--%>
<%--                                            <a data-f="spu-brand-qp" data-c="brand-qp"--%>
<%--                                               href="?brand=20324&amp;q=%C4%CC%B7%DB&amp;sort=s&amp;style=g&amp;from=sn_1_brand-qp&amp;suggest=0_2&amp;spm=875.7931836/B.a2227oh.d100&amp;smAreaId=430200#J_crumbs"--%>
<%--                                               title="Nutrilon/诺优能"--%>
<%--                                               atpanel="12,20324,,,spu-brand-qp,4,brand-qp,">--%>
<%--                                                Nutrilon/诺优能--%>
<%--                                            </a>--%>
<%--                                        </li>--%>
<%--                                        <li>--%>
<%--                                            <a data-f="spu-brand-qp" data-c="brand-qp"--%>
<%--                                               href="?brand=20317&amp;q=%C4%CC%B7%DB&amp;sort=s&amp;style=g&amp;from=sn_1_brand-qp&amp;suggest=0_2&amp;spm=875.7931836/B.a2227oh.d100&amp;smAreaId=430200#J_crumbs"--%>
<%--                                               title="Abbott/雅培" atpanel="13,20317,,,spu-brand-qp,4,brand-qp,">--%>
<%--                                                Abbott/雅培--%>
<%--                                            </a>--%>
<%--                                        </li>--%>
<%--                                        <li>--%>
<%--                                            <a data-f="spu-brand-qp" data-c="brand-qp"--%>
<%--                                               href="?brand=20313&amp;q=%C4%CC%B7%DB&amp;sort=s&amp;style=g&amp;from=sn_1_brand-qp&amp;suggest=0_2&amp;spm=875.7931836/B.a2227oh.d100&amp;smAreaId=430200#J_crumbs"--%>
<%--                                               title="Wyeth/惠氏" atpanel="14,20313,,,spu-brand-qp,4,brand-qp,">--%>
<%--                                                Wyeth/惠氏--%>
<%--                                            </a>--%>
<%--                                        </li>--%>
<%--                                        <li>--%>
<%--                                            <a data-f="spu-brand-qp" data-c="brand-qp"--%>
<%--                                               href="?brand=9312409&amp;q=%C4%CC%B7%DB&amp;sort=s&amp;style=g&amp;from=sn_1_brand-qp&amp;suggest=0_2&amp;spm=875.7931836/B.a2227oh.d100&amp;smAreaId=430200#J_crumbs"--%>
<%--                                               title="a 2" atpanel="15,9312409,,,spu-brand-qp,4,brand-qp,">--%>
<%--                                                a 2--%>
<%--                                            </a>--%>
<%--                                        </li>--%>
<%--                                        <li>--%>
<%--                                            <a data-f="spu-brand-qp" data-c="brand-qp"--%>
<%--                                               href="?brand=20403&amp;q=%C4%CC%B7%DB&amp;sort=s&amp;style=g&amp;from=sn_1_brand-qp&amp;suggest=0_2&amp;spm=875.7931836/B.a2227oh.d100&amp;smAreaId=430200#J_crumbs"--%>
<%--                                               title="BIOSTIME/合生元"--%>
<%--                                               atpanel="16,20403,,,spu-brand-qp,4,brand-qp,">--%>
<%--                                                BIOSTIME/合生元--%>
<%--                                            </a>--%>
<%--                                        </li>--%>
<%--                                        <li>--%>
<%--                                            <a data-f="spu-brand-qp" data-c="brand-qp"--%>
<%--                                               href="?brand=725136661&amp;q=%C4%CC%B7%DB&amp;sort=s&amp;style=g&amp;from=sn_1_brand-qp&amp;suggest=0_2&amp;spm=875.7931836/B.a2227oh.d100&amp;smAreaId=430200#J_crumbs"--%>
<%--                                               title="The land/纽仕兰"--%>
<%--                                               atpanel="17,725136661,,,spu-brand-qp,4,brand-qp,">--%>
<%--                                                The land/纽仕兰--%>
<%--                                            </a>--%>
<%--                                        </li>--%>
<%--                                        <li>--%>
<%--                                            <a data-f="spu-brand-qp" data-c="brand-qp"--%>
<%--                                               href="?brand=91959695&amp;q=%C4%CC%B7%DB&amp;sort=s&amp;style=g&amp;from=sn_1_brand-qp&amp;suggest=0_2&amp;spm=875.7931836/B.a2227oh.d100&amp;smAreaId=430200#J_crumbs"--%>
<%--                                               title="启赋" atpanel="18,91959695,,,spu-brand-qp,4,brand-qp,">--%>
<%--                                                启赋--%>
<%--                                            </a>--%>
<%--                                        </li>--%>
<%--                                        <li>--%>
<%--                                            <a data-f="spu-brand-qp" data-c="brand-qp"--%>
<%--                                               href="?brand=3500955&amp;q=%C4%CC%B7%DB&amp;sort=s&amp;style=g&amp;from=sn_1_brand-qp&amp;suggest=0_2&amp;spm=875.7931836/B.a2227oh.d100&amp;smAreaId=430200#J_crumbs"--%>
<%--                                               title="荷兰乳牛" atpanel="19,3500955,,,spu-brand-qp,4,brand-qp,">--%>
<%--                                                荷兰乳牛--%>
<%--                                            </a>--%>
<%--                                        </li>--%>
<%--                                        <li>--%>
<%--                                            <a data-f="spu-brand-qp" data-c="brand-qp"--%>
<%--                                               href="?brand=1700724796&amp;q=%C4%CC%B7%DB&amp;sort=s&amp;style=g&amp;from=sn_1_brand-qp&amp;suggest=0_2&amp;spm=875.7931836/B.a2227oh.d100&amp;smAreaId=430200#J_crumbs"--%>
<%--                                               title="FRISO PRESTIGE/皇家美素佳儿"--%>
<%--                                               atpanel="20,1700724796,,,spu-brand-qp,4,brand-qp,">--%>
<%--                                                FRISO PRESTIGE/皇家美素佳儿--%>
<%--                                            </a>--%>
<%--                                        </li>--%>
<%--                                    </ul>--%>
<%--                                    <div class="av-options">--%>
<%--                                        <a class="j_Multiple avo-multiple" href="javascript:;"--%>
<%--                                           atpanel="0,brand-multi,,,,20,brand,">多选<i></i></a>--%>
<%--                                        <a style="visibility: visible; display: inline;"--%>
<%--                                           class="j_More avo-more ui-more-drop-l" href="javascript:;"--%>
<%--                                           data-url="//list.tmall.com/ajax/allBrandShowForGaiBan.htm?q=%C4%CC%B7%DB&amp;sort=s&amp;style=g&amp;from=mallfp..pc_1_suggest&amp;suggest=0_2&amp;spm=875.7931836/B.a2227oh.d100&amp;smAreaId=430200&amp;userIDNum=3574779617&amp;tracknick=ansen16195"--%>
<%--                                           atpanel="0,20000_more,,,spu-brand,20,brand,">--%>
<%--                                            更多--%>
<%--                                            <i class="ui-more-drop-l-arrow"></i>--%>
<%--                                        </a>--%>
<%--                                    </div>--%>
<%--                                    <div class="av-btns">--%>
<%--                                        <a class="j_SubmitBtn ui-btn-s-primary ui-btn-disable"--%>
<%--                                           href="javascript:;" atpanel="0,brand-multi,,,,20,brand,">确定</a>--%>
<%--                                        <a class="j_CancelBtn ui-btn-s" href="javascript:;">取消</a>--%>
<%--                                    </div>--%>
<%--                                </div>--%>
<%--                            </div>--%>

<%--                        </div>--%>
                        <%-- 展示分类条件：用户未选择过分类 并且 查询到的产品大于0 --%>
                        <c:if test="${fn:length(products) > 0 and (empty param.cat or param.cat == 0)}">
                        <div class="cateAttrs j_nav_cat" data-spm="a220m.1000858.1000721">
                            <div class="j_Cate attr">
                                <div class="attrKey">分类</div>
                                <div class="attrValues">
                                    <ul class="av-collapse" data-atp="{loc},{cat},,,{f},3,{c},"
                                        style="height: auto;">
                                        <c:forEach items="${categories}" var="category" varStatus="vs">
                                            <li>
                                                <a title="${category.name}" data-f="spu-cat-qp" data-c="cat-qp"
                                                   href="?enter=${param.enter}&cat=${category.id}&sort=${param.sort}&discount=${param.discount}&lowPrice=${param.lowPrice}&highPrice=${param.highPrice}">
                                                    <b>${category.name}</b>
                                                </a>
                                            </li>
                                        </c:forEach>
                                    </ul>
                                </div>
                            </div>
                        </div>
                        </c:if>
                        <div class="attrs-border"></div>
                    </div>


                </form>
                <div id="J_RelSearch">

                    <p class="relKeyRec relKeyHide" data-spm="a220m.1000858.1000723"
                       data-atp="{loc},{q},,,spu-key,5,key-top-s,">
                        <span>您是不是想找</span>
                        <c:forEach items="${textLists}" var="text" varStatus="vs">
                          <a href="/search_product.htm?enter=${text.text}">${text.text}</a>
                         </c:forEach>
                    </p>
                </div>

                <div class="filter clearfix" id="a-a" data-spm="a220m.1000858.1000724"
                     data-spm-max-idx="9">
                    <a class="fSort ${empty param.sort?'fSort-cur':''}"
                       href="?enter=${param.enter}&discount=${param.discount}"
                       title="点击后恢复默认排序">综合<i class="f-ico-arrow-d"></i></a>
                    <a class="fSort ${param.sort == 'hot'?'fSort-cur':''}"
                       href="?enter=${param.enter}&sort=hot&discount=${param.discount}"
                       title="点击后按人气从高到低">人气<i class="f-ico-arrow-d"></i></a>

                    <!--Test   -->
                    <!--Test s  -->
                    <a class="fSort ${param.sort == 'new'?'fSort-cur':''}"
                       href="?enter=${param.enter}&sort=new&discount=${param.discount}">新品<i
                            class="f-ico-arrow-d"></i></a>

                    <a class="fSort ${param.sort == 'deal'?'fSort-cur':''}"
                       href="?enter=${param.enter}&sort=deal&discount=${param.discount}" name=""
                       title="点击后按月销量从高到低">销量<i class="f-ico-arrow-d"></i></a>



                    <a class="fSort ${param.sort == 'priceDesc' or param.sort=='priceAsc'?'fSort-cur':''}"
                       href="?enter=${param.enter}&sort=${param.sort =='priceDesc'?'priceAsc':'priceDesc'}&discount=${param.discount}"
                       title="点击后按价格升序">价格<i class="iconfont icon-new_shangjiantou price-ad" style="top: -4px;left: 5px;${param.sort=='priceDesc'?'color: ;':'color: #806f66'}"></i><i
                            class="iconfont icon-new_xiajiantou price-ad" style="${param.sort=='priceAsc'?'color: ;':'color: #806f66'}"></i></a>
                    <form id="J_FForm">
                        <div class="fPrice" id="J_FPrice">
                            <div class="fP-box">
                                <b class="fPb-item">
                                    <i class="ui-price-plain">￥</i>
                                    <input type="number" class="J_TFPInput" id="firstPrice" autocomplete="off" value="${param.lowPrice}">
                                </b>
                                <i class="fPb-split"></i>
                                <b class="fPb-item">
                                    <i class="ui-price-plain">￥</i>
                                    <input type="number" class="J_TFPInput" id="lastPrice" autocomplete="off" value="${param.highPrice}">
                                </b>
                            </div>
                            <div class="fP-expand" style="display: none; position: absolute;top: 27px;">
                                <a class="ui-btn-s J_TFPCancel" id="removeAll">清空</a>
                                <a class="ui-btn-s-primary J_TFPEnter" id="confirmPrice">确定</a>
                            </div>
                        </div>
                        <div class="fMenu" id="J_FMenu">
                            <div class="fM-con">

                                <label><input type="checkbox" name="miaosha" value="1" id="zhekou" ${param.discount?'checked':''}>折扣</label>
                            </div>
                        </div>
                        <input type="hidden" name="search_condition" value="48"> <input type="hidden"
                                                                                        name="sort" value="s"><input type="hidden" name="style" value="g"><input
                            type="hidden" name="from" value="mallfp..pc_1_suggest"><input type="hidden"
                                                                                          name="suggest" value="0_2"> <input name="q" type="hidden" value="奶粉"> <input
                            name="shopType" type="hidden" value="any"> <input name="sceneq" type="hidden"
                                                                              value="">
                    </form>
                    <a href="javascript:; " class="fType-g fType-cur" atpanel=",g,,,,20,filter,"
                       data-spm-anchor-id="a220m.1000858.1000724.8">大图<i class="fTg-ico"></i></a>
                    <p class="ui-page-s">
                        <fmt:formatNumber var="c" value="${(allCount  +  90  - 1) / 90}" pattern="#"/>
                        <b class="ui-page-s-len">${empty param.curr?'1':param.curr}/${c}</b>
                        <c:if test="${empty param.curr or param.curr == 1}" var="prevTerm">
                            <b title="上一页"class="ui-page-s-prev">&lt;</b>
                        </c:if>
                        <c:if test="${!prevTerm}">
                            <a title="上一页"class="ui-page-s-prev">&lt;</a>
                        </c:if>
                        <c:if test="${param.curr == c or (empty param.curr and c == 1)}" var="nextTerm">
                            <b title="下一页"class="ui-page-s-next">></b>
                        </c:if>
                        <c:if test="${!nextTerm}">
                            <a title="下一页"class="ui-page-s-next">></a>
                        </c:if>
                    </p>
                </div>
                <div id="J_FilterPlaceholder" style="height: 54px; display: none;"></div>
                <div class="view grid-nosku " id="J_ItemList" data-spm="a220m.1000858.1000725" data-area="杭州">

                    <c:forEach items="${products}" var="product" varStatus="vs1">
                    <div class="product">
                        <div class="product-iWrap">
                            <div class="productImg-wrap">
                                <a href="/buy.htm?pid=${product.id}&sid=${product.shop.id}&skuCode=0" class="productImg" target="_blank" data-p="50-10">
                                    <img src="${product.productImages[0].imagePath}">
                                </a>
                            </div>
                            <p class="productPrice">
                                <em title="${product.nowPrice}"><b>¥</b>${product.nowPrice}</em>
                            </p>
                            <p class="productTitle">
                                <a href="" target="_blank" title="${product.productName}" data-p="50-11">
                                    ${tfn:filterKeywordsByString(product.productName, enter)}
                                </a>
                            </p>
                            <div class="productShop">
                                <a class="productShop-name" href="/shop/view_shop.htm?brandId=${product.shop.id}" target="_blank">
                                        ${product.shop.shopName}
                                </a>
                            </div>
                            <p class="productStatus">
                                <span>月成交 <em>${product.productMonthDeal.count}笔</em></span>
                                <span>评价 <a href="" target="_blank">${product.commentCount}</a></span>
                                <span data-icon="small" class="ww-light ww-small" data-item="553235786582"
                                      data-nick="${product.shop.shopName}" data-tnick="${product.shop.shopName}">
                                    <a data-to-uid="${product.shop.id}" target="_blank" class="ww-inline ww-online" title="点此可以直接和卖家交流选好的宝贝，或相互交流网购体验，还支持语音视频噢。">
                                        <span>旺旺在线</span>
                                    </a>
                                </span>
                            </p>
                        </div>
                    </div>
                    </c:forEach>

                </div>

                    <c:if test="${!isSplit and fn:length(products) < 1}">
                        <div class="nrt">
                            <p>已为您找到${notTermProductCount}件与<em>“ ${param.enter} ”</em>相關的商品</p>
                            <p class="nrt-guide">但是它们并不满足于您的查找条件，龙猫建议你更换条件试一试
                            </p>
                        </div>
                    </c:if>

                    <!--start PCSceneVideo -->
                <!--end PCSceneVideo -->

                <div class="search-page">
                    <input type="hidden" id="allCount" value="${allCount}"/>
                    <div id="searchPagination"></div>
                </div>
                    <style>
                        .search-page a, .search-page span {
                            font-family: \5B8B\4F53,Helvetica,sans-serif;
                        }
                        .layui-laypage {
                            padding-top: 19px;
                            background: url() left 0 no-repeat;
                        }
                        .layui-laypage-prev.layui-disabled{
                            background-color: #EFEFEF;
                        }
                        .layui-laypage-next.layui-disabled{
                            background-color: #EFEFEF;
                        }
                        .search-page a, .search-page span{
                            font-size: 14px;
                            font-weight: 700;
                            height: 40px;
                            line-height: 40px;
                        }
                        .search-page a:hover, .layui-laypage button:hover{
                            background-color: #EFEFEF;
                        }
                        .layui-laypage .layui-laypage-curr .layui-laypage-em{
                            background-color: #EFEFEF;
                            top:0;
                            padding: 0;
                            left: 0;
                        }
                        .layui-laypage .layui-laypage-curr em{
                            color: #999;
                        }

                        .layui-laypage a, .layui-laypage span {
                            color: #2953A6;
                        }
                        .layui-laypage a, .layui-laypage .layui-laypage-curr, .layui-laypage button, .layui-laypage input, .layui-laypage select, .layui-laypage span{
                            border: 1px solid #E5E5E5;
                        }
                    </style>
                    <p class="relKeyRec relKeyHide" data-spm="a220m.1000858.1000723"
                       data-atp="{loc},{q},,,spu-key,5,key-top-s,">
                        <span>您是不是想找</span>
                        <c:forEach items="${textLists}" var="text" varStatus="vs">
                            <a href="/search_product.htm?enter=${text.text}">${text.text}</a>
                        </c:forEach>
                    </p>


                </c:if>



                <div id="J_Recommend" class="recommend-loading" style="margin-top: 30px;"
                     data-p4p-cfg="{'catid':'','keyword':'%C4%CC%B7%DB','propertyid':'','pid':'419108_1006','frontcatid':'','gprice':'0%2C100000000','loc':'','sort':'','sbid':'0','q2cused':'0','page':'1'}"
                     data-atp="{idx},{itemid},,,p4p,1,p4p,">
                    <tbcc id="tbcc-c-c2016-8-131194-1620867045314" data-args="?sbid=1"
                          style="overflow: hidden; display: block;" tbcc-templet="p4p/tb/tmall_10_09-2015-1111">
                        <tbcc>
                            <div class="c2016-8-131194-1620902869486-global">
                                <div class="c2016-8-131194-1620902869486-logo">
                                    <div class="c2016-8-131194-1620902869486-ad"></div><a
                                        class="c2016-8-131194-1620902869486-remai"
                                        href="//re.taobao.com/search?keyword=%C4%CC%B7%DB&amp;frontcatid=&amp;posid=1&amp;isinner=1&amp;refpid=419108_1006&amp;ismall=1"
                                        target="_blank" atpanel=",,,,p4p,1,p4p,">掌柜热卖</a><a
                                        class="c2016-8-131194-1620902869486-more"
                                        href="//re.taobao.com/search?keyword=%C4%CC%B7%DB&amp;frontcatid=&amp;posid=1&amp;isinner=1&amp;refpid=419108_1006&amp;ismall=1"
                                        target="_blank" atpanel=",,,,p4p,1,p4p,">更多热卖&gt;</a>
                                </div>
                                <ul class="c2016-8-131194-1620902869486-shop-list">
                                    <c:forEach items="${sellerHotProduct}" var="product" varStatus="vs">
                                        <li class="c2016-8-131194-1620902869486-item">
                                            <div class="c2016-8-131194-1620902869486-item-inner">
                                                <div class="c2016-8-131194-1620902869486-imgwrap">
                                                    <a class="c2016-8-131194-1620902869486-imglink" target="_blank" href="/buy.htm?pid=${product.id}"
                                                        title="${product.productName}">
                                                        <img src="${product.productImages.get(0).imagePath}" style="max-width: 221px; max-height: 222px;">
                                                    </a>
                                                </div>
                                                <div class="c2016-8-131194-1620902869486-info1">
                                                    <a target="_blank"
                                                       href="/buy.htm?pid=${product.id}" class="c2016-8-131194-1620902869486-price">
                                                        <span>¥<em>${tfn:formatNumber(product.nowPrice, 2)}</em></span>
                                                    </a>
                                                    <a target="_blank" href="" class="c2016-8-131194-1620902869486-sell">月成交
                                                    <em>${product.productMonthDeal.count}笔</em>
                                                    </a>
                                                </div>
                                                <a target="_blank" class="c2016-8-131194-1620902869486-redtitle" href="/buy.htm?pid=${product.id}" title="${product.productName}">
                                                        ${product.productName}
                                                </a>
                                                <div class="c2016-8-131194-1620902869486-info3">
                                                    <a target="_blank" href="/buy.htm?pid=${product.id}" class="c2016-8-131194-1620902869486-wangwang">${product.shop.shopName}</a>
                                                    <a class="c2016-8-131194-1620902869486-postfree" target="_blank" href="">免运费</a>
                                                </div>
                                                <div class="c2016-8-131194-1620902869486-info2"
                                                     style="display:none">
                                                    <a target="_blank" href="/buy.htm?pid=${product.id}"   class="c2016-8-131194-1620902869486-sell">月成交
                                                    <em>${product.productMonthDeal.count}笔</em></a>
                                                    <div class="c2016-8-131194-1620902869486-line"></div>
                                                    <a target="_blank" href="/buy.htm?pid=${product.id}" class="c2016-8-131194-1620902869486-comment">评价
                                                        <em>${product.commentCount}</em></a>
                                                </div>
                                                <div class="c2016-8-131194-1620902869486-shuang11bar">
                                                    <div class="c2016-8-131194-1620902869486-shuang11bar-icons">
                                                    </div>
                                                </div>
                                            </div>
                                        </li>
                                    </c:forEach>
                                </ul>
                            </div>
                        </tbcc>
                    </tbcc>
                </div>

                <div class="btmSearch-loading" id="J_BtmSearch">
                    <div class="btmSearch">
                        <div class="btmSearch-main">
                            <form class="btmSearch-form clearfix" action="/search_product.htm" target="_top">
                                <fieldset>
                                    <div class="btmSearch-input clearfix">
                                        <input type="text" value="${enter}" autocomplete="off" tabindex="9"
                                               accesskey="s" class="btmSearch-mq" id="btm-mq" data-bts="0" name="enter"
                                               aria-label="搜索关键词">
                                        <button type="submit" class="ui-btn-search-l" name="search-btn" value="搜索">搜索<s></s></button>
                                        <input type="hidden" name="spm" value="${tfn:getRandomChar(27)}">
                                    </div>
                                </fieldset>
                            </form>
                        </div>
                    </div>
                </div>
                <p class="btmFeed">
                    喵~在此反馈您的意见和建议吧，<a
                        href="?q=%C4%CC%B7%DB&amp;sort=s&amp;style=g&amp;from=mallfp..pc_1_suggest&amp;suggest=0_2&amp;spm=875.7931836/B.a2227oh.d100&amp;smAreaId=430200&amp;feedback=true"
                        target="_blank">立刻反馈</a>
                </p>
            </div>
        </div>
    </div>
</div>
<div id="ks-component863" class="s-popupmenu s-menu s-popupmenu-hidden s-menu-hidden" role="menu"
     style="user-select: none; left: 637px; top: 91px; width: 506px;">
    <div id="ks-content-ks-component863" class="s-popupmenu-content s-menu-content">

    </div>
    <div id="ks-component2305" class="s-menuitem find-shop" role="menuitem" style="user-select: none; display: none">
        <div class="s-mi-tip"></div>
    </div>
    <div id="ks-component2361" class="s-menuitem s-menuitem-disabled ks-component-child268" aria-disabled="true"
         role="menuitem" style="user-select: none;"><p class="s-mi-qs"><i></i>按快捷键 <em>shift</em> + <em>?</em>
        可以随时打开快捷搜索框，赶紧试试吧~</p>
    </div>
</div>
</div>
</div>
</div>
</body>
<script>
    // 上一页下一页
    $(".ui-page-s-prev").click(function () {
        var curr = Totoro.getQueryVariable("curr");
        var newUrl = Totoro.changeURLPar(window.location.href, "curr", parseInt(curr)-1);
        window.location.href = newUrl;
    });

    $(".ui-page-s-next").click(function () {
        var curr = Totoro.getQueryVariable("curr")==false?0:Totoro.getQueryVariable("curr");
        var newUrl = Totoro.changeURLPar(window.location.href, "curr", parseInt(curr)+1);
        window.location.href = newUrl;
    })
    // 分页
    layui.use(['laypage', 'layer'], function() {
        var laypage = layui.laypage
            , layer = layui.layer;
        laypage.render({
            elem: 'searchPagination'
            ,count: $("#allCount").val()
            ,limit: 60
            ,curr: Totoro.getQueryVariable("curr")
            ,groups: 3
            ,layout: ['count', 'prev', 'page', 'next', 'skip']
            ,jump: function(obj, first){
                //首次不执行
                if(!first){
                    var newUrl = Totoro.changeURLPar(window.location.href, "curr", obj.curr);
                    window.location.href = newUrl;
                }
            }
        });
    });

    $(function(){
        $(document).on('mousewheel DOMMouseScroll', onMouseScroll);
        function onMouseScroll(e){
            e.preventDefault();
            var wheel = e.originalEvent.wheelDelta || -e.originalEvent.detail;
            var delta = Math.max(-1, Math.min(1, wheel) );
            var height=document.documentElement.scrollTop+document.body.scrollTop;
            console.log(height)
            if(delta<0){//向下滚动
                if(height>350){
                    $(".filter").attr("id","J_Filter");
                }
            }else{//向上滚动
                if(height<350){
                    $(".filter").attr("id","");
                    $("#J_Filter").attr("class","filter");
                }
            }
        }



        $(".s-combobox-input").keyup(function () {
            var value = $(this).val();
            if(value.length > 0) {
                showReturnDialog(value);
            } else{
                $("#ks-component863").addClass("s-popupmenu-hidden s-menu-hidden");
            }
        }).blur(function () {
            setTimeout(function () {
                $("#ks-component863").addClass("s-popupmenu-hidden s-menu-hidden");
            }, 100);
        }).focus(function () {
            var value = $(this).val();
            if(value.length > 0) {
                showReturnDialog(value);
            }
        })

        function showReturnDialog(value) {
            if(value.length > 0) {
                $("#ks-component863").removeClass("s-popupmenu-hidden s-menu-hidden");
                $(".s-popupmenu-content").html("");
                $.post("/searchReturn.htm", {"value": value}, function (res) {
                    let response = eval("(" + res + ")");
                    console.log(response.data)
                    for (let i = 0; i < response.data.length; i++) {
                        var key = response.data[i]['text'];
                        var val = response.data[i]['searchCount'];
                        $(".s-popupmenu-content").append($("<div id='ks-component1745' class='s-menuitem ks-component-child268' data-keyword='"+key+"' role='menuitem' style='user-select: none;'>\n" +
                            "            <div class='s-mi-list'>\n" +
                            "                <span class='s-mi-cont-key'>" + value + "<b>" + key.toString().substring(value.length) + "</b></span>\n" +
                            "                <span class='s-mi-cont-count'>约" + val + "个结果</span><a class='s-mi-btn-backfill' href='javascript:;'>回填</a>\n" +
                            "            </div>\n" +
                            "        </div>"));
                    }
                    if(response.data.length < 1){
                        $(".s-mi-tip").show().text("暂无数据，请换一个关键字试试吧");
                    } else{
                        $(".s-mi-tip").hide().text("");
                    }
                });
            }
        }

        // 点击选项，搜索某个关键字
        $("body").on("click", ".s-menuitem", function () {
            var value = $(this).attr("data-keyword");
            window.location.href = "/search_product.htm?enter="+value;
        })

        // 搜索之前，必须输入
        $(".mallSearch-form").submit(function () {
            var value = $(".s-combobox-input").val().replace(/\s*/g,"");
            $(".s-combobox-input").val(value);
            if(value.length < 1){
                $(".s-combobox-input").attr("placeholder", "请输入关键字");
                $(".s-combobox-input").addClass("arrow_box");
                setTimeout(function () {
                    $(".s-combobox-input").removeClass("arrow_box");
                }, 1200);
                return false;
            }
        });

        // 搜索框
        $(window).resize(function() {
            var heights = $(window).height();
            var widths = $(window).width();
            var $x = $(".mallSearch-input").offset().left;
            var $y = $(".mallSearch-input").offset().top;
            $(".s-popupmenu").css({"left":$x+"px"});
        })
    });


    $(".J_TFPInput").focus(function(){
        setTimeout(v =>{
            $(".J_TFPrice").addClass("fPrice-hover");
            $(".ui-price-plain").css("display","none");
            $(".fP-expand").css("display","block");
        }, 100);
    }).blur(function(){
        setTimeout(v=>{
            $(".J_TFPrice").removeClass("fPrice-hover");
            $(".ui-price-plain").css("display","block");
            $(".fP-expand").css("display","none");
        },100);
    });

    // 清空输入的价格
    $("#removeAll").click(function () {
        $("#firstPrice").val("");
        $("#lastPrice").val("");
        var newUrl = Totoro.deleteURLPar(window.location.href, "lowPrice");
        var finalUrl = Totoro.deleteURLPar(newUrl, "highPrice");
        window.history.pushState(null,null,finalUrl);
        $(".J_TFPInput").focus();
    });
    // 确认价格区间
    $("#confirmPrice").click(function () {
        var lowPrice = $("#firstPrice").val();
        var highPrice = $("#lastPrice").val();
        var lowUrl = Totoro.changeURLPar(window.location.href, "lowPrice", lowPrice);
        var finalUrl = Totoro.changeURLPar(lowUrl, "highPrice", highPrice);
        window.location.href=finalUrl;
    });

    // 点击折扣复选框，查看折扣商品
    $("#zhekou").click(function () {
        var newUrl = Totoro.changeURLPar(window.location.href, 'discount', $(this).prop("checked"));
        window.location.href = newUrl;
    });
</script>
</html>
